\(\int \frac {a+b x+c x^2}{(1-d x)^{3/2} (1+d x)^{3/2}} \, dx\) [799]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 30, antiderivative size = 40 \[ \int \frac {a+b x+c x^2}{(1-d x)^{3/2} (1+d x)^{3/2}} \, dx=\frac {b+\left (c+a d^2\right ) x}{d^2 \sqrt {1-d^2 x^2}}-\frac {c \arcsin (d x)}{d^3} \]

[Out]

-c*arcsin(d*x)/d^3+(b+(a*d^2+c)*x)/d^2/(-d^2*x^2+1)^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {913, 1828, 12, 222} \[ \int \frac {a+b x+c x^2}{(1-d x)^{3/2} (1+d x)^{3/2}} \, dx=\frac {x \left (a d^2+c\right )+b}{d^2 \sqrt {1-d^2 x^2}}-\frac {c \arcsin (d x)}{d^3} \]

[In]

Int[(a + b*x + c*x^2)/((1 - d*x)^(3/2)*(1 + d*x)^(3/2)),x]

[Out]

(b + (c + a*d^2)*x)/(d^2*Sqrt[1 - d^2*x^2]) - (c*ArcSin[d*x])/d^3

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 913

Int[((d_) + (e_.)*(x_))^(m_)*((f_) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :>
Int[(d*f + e*g*x^2)^m*(a + b*x + c*x^2)^p, x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[m - n, 0] &&
EqQ[e*f + d*g, 0] && (IntegerQ[m] || (GtQ[d, 0] && GtQ[f, 0]))

Rule 1828

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*
g - b*f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \int \frac {a+b x+c x^2}{\left (1-d^2 x^2\right )^{3/2}} \, dx \\ & = \frac {b+\left (c+a d^2\right ) x}{d^2 \sqrt {1-d^2 x^2}}-\int \frac {c}{d^2 \sqrt {1-d^2 x^2}} \, dx \\ & = \frac {b+\left (c+a d^2\right ) x}{d^2 \sqrt {1-d^2 x^2}}-\frac {c \int \frac {1}{\sqrt {1-d^2 x^2}} \, dx}{d^2} \\ & = \frac {b+\left (c+a d^2\right ) x}{d^2 \sqrt {1-d^2 x^2}}-\frac {c \sin ^{-1}(d x)}{d^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.33 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.42 \[ \int \frac {a+b x+c x^2}{(1-d x)^{3/2} (1+d x)^{3/2}} \, dx=\frac {\frac {d \left (b+\left (c+a d^2\right ) x\right )}{\sqrt {1-d^2 x^2}}-2 c \arctan \left (\frac {d x}{-1+\sqrt {1-d^2 x^2}}\right )}{d^3} \]

[In]

Integrate[(a + b*x + c*x^2)/((1 - d*x)^(3/2)*(1 + d*x)^(3/2)),x]

[Out]

((d*(b + (c + a*d^2)*x))/Sqrt[1 - d^2*x^2] - 2*c*ArcTan[(d*x)/(-1 + Sqrt[1 - d^2*x^2])])/d^3

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.45 (sec) , antiderivative size = 151, normalized size of antiderivative = 3.78

method result size
default \(\frac {\left (-\sqrt {-d^{2} x^{2}+1}\, \operatorname {csgn}\left (d \right ) d^{3} a x -\arctan \left (\frac {\operatorname {csgn}\left (d \right ) d x}{\sqrt {-\left (d x -1\right ) \left (d x +1\right )}}\right ) c \,d^{2} x^{2}-\sqrt {-d^{2} x^{2}+1}\, \operatorname {csgn}\left (d \right ) d c x -\operatorname {csgn}\left (d \right ) d \sqrt {-d^{2} x^{2}+1}\, b +\arctan \left (\frac {\operatorname {csgn}\left (d \right ) d x}{\sqrt {-\left (d x -1\right ) \left (d x +1\right )}}\right ) c \right ) \sqrt {-d x +1}\, \operatorname {csgn}\left (d \right )}{\left (d x -1\right ) \sqrt {-d^{2} x^{2}+1}\, d^{3} \sqrt {d x +1}}\) \(151\)

[In]

int((c*x^2+b*x+a)/(-d*x+1)^(3/2)/(d*x+1)^(3/2),x,method=_RETURNVERBOSE)

[Out]

(-(-d^2*x^2+1)^(1/2)*csgn(d)*d^3*a*x-arctan(csgn(d)*d*x/(-(d*x-1)*(d*x+1))^(1/2))*c*d^2*x^2-(-d^2*x^2+1)^(1/2)
*csgn(d)*d*c*x-csgn(d)*d*(-d^2*x^2+1)^(1/2)*b+arctan(csgn(d)*d*x/(-(d*x-1)*(d*x+1))^(1/2))*c)*(-d*x+1)^(1/2)*c
sgn(d)/(d*x-1)/(-d^2*x^2+1)^(1/2)/d^3/(d*x+1)^(1/2)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 101 vs. \(2 (38) = 76\).

Time = 0.31 (sec) , antiderivative size = 101, normalized size of antiderivative = 2.52 \[ \int \frac {a+b x+c x^2}{(1-d x)^{3/2} (1+d x)^{3/2}} \, dx=\frac {b d^{3} x^{2} - {\left (b d + {\left (a d^{3} + c d\right )} x\right )} \sqrt {d x + 1} \sqrt {-d x + 1} - b d + 2 \, {\left (c d^{2} x^{2} - c\right )} \arctan \left (\frac {\sqrt {d x + 1} \sqrt {-d x + 1} - 1}{d x}\right )}{d^{5} x^{2} - d^{3}} \]

[In]

integrate((c*x^2+b*x+a)/(-d*x+1)^(3/2)/(d*x+1)^(3/2),x, algorithm="fricas")

[Out]

(b*d^3*x^2 - (b*d + (a*d^3 + c*d)*x)*sqrt(d*x + 1)*sqrt(-d*x + 1) - b*d + 2*(c*d^2*x^2 - c)*arctan((sqrt(d*x +
 1)*sqrt(-d*x + 1) - 1)/(d*x)))/(d^5*x^2 - d^3)

Sympy [F(-1)]

Timed out. \[ \int \frac {a+b x+c x^2}{(1-d x)^{3/2} (1+d x)^{3/2}} \, dx=\text {Timed out} \]

[In]

integrate((c*x**2+b*x+a)/(-d*x+1)**(3/2)/(d*x+1)**(3/2),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 61, normalized size of antiderivative = 1.52 \[ \int \frac {a+b x+c x^2}{(1-d x)^{3/2} (1+d x)^{3/2}} \, dx=\frac {a x}{\sqrt {-d^{2} x^{2} + 1}} + \frac {c x}{\sqrt {-d^{2} x^{2} + 1} d^{2}} - \frac {c \arcsin \left (d x\right )}{d^{3}} + \frac {b}{\sqrt {-d^{2} x^{2} + 1} d^{2}} \]

[In]

integrate((c*x^2+b*x+a)/(-d*x+1)^(3/2)/(d*x+1)^(3/2),x, algorithm="maxima")

[Out]

a*x/sqrt(-d^2*x^2 + 1) + c*x/(sqrt(-d^2*x^2 + 1)*d^2) - c*arcsin(d*x)/d^3 + b/(sqrt(-d^2*x^2 + 1)*d^2)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 186 vs. \(2 (38) = 76\).

Time = 0.29 (sec) , antiderivative size = 186, normalized size of antiderivative = 4.65 \[ \int \frac {a+b x+c x^2}{(1-d x)^{3/2} (1+d x)^{3/2}} \, dx=-\frac {\frac {8 \, c \arcsin \left (\frac {1}{2} \, \sqrt {2} \sqrt {d x + 1}\right )}{d^{2}} - \frac {\frac {a d^{2} {\left (\sqrt {2} - \sqrt {-d x + 1}\right )}}{\sqrt {d x + 1}} - \frac {b d {\left (\sqrt {2} - \sqrt {-d x + 1}\right )}}{\sqrt {d x + 1}} + \frac {c {\left (\sqrt {2} - \sqrt {-d x + 1}\right )}}{\sqrt {d x + 1}}}{d^{2}} + \frac {{\left (a d^{2} - b d + c\right )} \sqrt {d x + 1}}{d^{2} {\left (\sqrt {2} - \sqrt {-d x + 1}\right )}} + \frac {2 \, {\left (a d^{4} + b d^{3} + c d^{2}\right )} \sqrt {d x + 1} \sqrt {-d x + 1}}{{\left (d x - 1\right )} d^{4}}}{4 \, d} \]

[In]

integrate((c*x^2+b*x+a)/(-d*x+1)^(3/2)/(d*x+1)^(3/2),x, algorithm="giac")

[Out]

-1/4*(8*c*arcsin(1/2*sqrt(2)*sqrt(d*x + 1))/d^2 - (a*d^2*(sqrt(2) - sqrt(-d*x + 1))/sqrt(d*x + 1) - b*d*(sqrt(
2) - sqrt(-d*x + 1))/sqrt(d*x + 1) + c*(sqrt(2) - sqrt(-d*x + 1))/sqrt(d*x + 1))/d^2 + (a*d^2 - b*d + c)*sqrt(
d*x + 1)/(d^2*(sqrt(2) - sqrt(-d*x + 1))) + 2*(a*d^4 + b*d^3 + c*d^2)*sqrt(d*x + 1)*sqrt(-d*x + 1)/((d*x - 1)*
d^4))/d

Mupad [F(-1)]

Timed out. \[ \int \frac {a+b x+c x^2}{(1-d x)^{3/2} (1+d x)^{3/2}} \, dx=\int \frac {c\,x^2+b\,x+a}{{\left (1-d\,x\right )}^{3/2}\,{\left (d\,x+1\right )}^{3/2}} \,d x \]

[In]

int((a + b*x + c*x^2)/((1 - d*x)^(3/2)*(d*x + 1)^(3/2)),x)

[Out]

int((a + b*x + c*x^2)/((1 - d*x)^(3/2)*(d*x + 1)^(3/2)), x)